package com.yangyang.androidconnect.phoneinfo.service;

import com.yangyang.androidconnect.MyApplication;
import com.yangyang.androidconnect.phoneinfo.DataCollectionService;
import com.yangyang.androidconnect.phoneinfo.DatabaseHelper;
import com.yangyang.androidconnect.phoneinfo.model.Contact;

import java.util.List;

public class ContactService {

    private DataCollectionService dataService;
    private DatabaseHelper databaseHelper;

    public ContactService() {
        initComponents();
    }

    private void initComponents() {
        dataService = MyApplication.getInstance().getDataCollectionService();
        databaseHelper = MyApplication.getInstance().getDatabaseHelper();
    }

    public List<Contact> getAllContact() {
        List<Contact> allContacts = dataService.getAllContacts();
        return allContacts;
    }
}
